package com.meilishuo.message.entity.common;

/**
 * the basic input of page
 * 
 * @author
 * 
 */
public class BasicPageForm {
	// The page size, means the max rows in one page
	private int pageSize = 10;
	// The current page number
	private int pageNumber = 1;
	// set the start number of page
	private int startNum = 0;

	public int getEndNum() {
		return startNum + pageSize;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getPageNumber() {
		return pageNumber;
	}

	public void setPageNumber(int pageNumber) {
		this.pageNumber = pageNumber;
	}

	public int getStartNum() {
		if (this.pageNumber == 0) {
			this.startNum = 0;
		} else {
			this.startNum = pageSize * (this.pageNumber - 1);
		}
		return this.startNum;
	}

}
